<?php

class Utilitarios_FuncoesPorPapeisController extends Zend_Rest_Controller {

	public function init() {
		/* Initialize action controller here */
		$ajaxContext = $this->_helper->contextSwitch();
		$ajaxContext->setAutoJsonSerialization(true);
		$ajaxContext
		->addActionContext('index', array('json'))
		->addActionContext('get', array('json'))
		->addActionContext('post', array('json'))
		->addActionContext('put', array('json'))
		->addActionContext('delete', array('json'))
		->initContext('json');
	}

	public function indexAction(){
		$model=new Application_Model_Utilitarios_FuncaoPorPapel();
		$filter=Zend_Json::decode($this->getRequest()->getParam('filter'));
		$result=$model->index($filter, $this->getRequest()->getParam('start'), $this->getRequest()->getParam('limit'), $this->getRequest()->getParam('sort'));
		print Zend_Json::encode($result);
		exit;
	}

	public function getAction(){
	}

	public function postAction(){
	}

	public function putAction(){
	}

	public function deleteAction(){
	}

}